package com.leyou.common.exceptions;

import com.leyou.common.enums.ExceptionEnum;
import lombok.Getter;

/**
 * 处理请求和响应的方法
 *
 * @version V1.0
 * @package com.leyou.common.exceptions
 * @description:
 * @author: pc
 * @date: 2019/6/22 20:17
 */

@Getter
public class LyException extends RuntimeException {
    private int status;


    public LyException(int status, String message) {
        super(message);
        this.status = status;
    }

    public LyException(int status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public LyException(ExceptionEnum em) {
        super(em.getMessage());
        this.status = status;
    }

    public LyException(ExceptionEnum em, Throwable cause) {
        super(em.getMessage(),cause);
        this.status = status;
    }
}
